<template>
  <div>
    <van-empty image="error" :description='description' />
  </div>
</template>

<script>
export default {
  data () {
    return {
      time: 3,
      description: '页面不存在，3秒后返回首页'
    }
  },
  mounted () {
    const timer = setInterval(() => {
      this.description = `页面不存在，${--this.time}秒后返回首页`
      if (this.time === 0) {
        clearInterval(timer)
        this.$router.replace('home')
      }
    }, 1000)
  }
}
</script>

<style lang="scss" scoped>

</style>
